home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7075 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  37 lines

  1. Path: gryphon.phoenix.net!usenet
  2. From: brucew@phoenix.net (Bruce Wedding)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: PROBLEMS WITH A STRUCTURE...
  5. Date: Sun, 18 Feb 1996 07:22:27 GMT
  6. Organization: BranPaul Systems
  7. Message-ID: <4g6k4i$sqk@gryphon.phoenix.net>
  8. References: <4g3c55$413@hermes.fundp.ac.be>
  9. NNTP-Posting-Host: dial45.phoenix.net
  10. X-Newsreader: Moe's Newsreader    
  11.  
  12.  
  13. >aa_specifications[0].atoms_in_distance[0] = {"X","X","X"};
  14.  
  15. When you cut through all the typedef BS, these are just two
  16. dimensional arrays.  You can't assign strings with the assignment
  17. operator in C.  Try this to replace the above line and follow all
  18. others the same way.
  19.  
  20. #include <string.h>
  21.  
  22. strcpy(aa_specifications[0].atoms_in_distance[0][0],"X");
  23. strcpy(aa_specifications[0].atoms_in_distance[0][1],"X");
  24. strcpy(aa_specifications[0].atoms_in_distance[0][2],"X");
  25.  
  26. BTW: Your email address is screwed up or you would have gotten a
  27. copy of it.
  28.  
  29.  
  30.  
  31.  
  32.  
  33. Bruce D. Wedding                        Have Compiler, Will Travel!
  34.               Perspicacious Programming Performed Promptly
  35. Katy, Texas, USA, Planet Earth, Milkyway Galaxy, Known Universe
  36.  
  37.